gusucode.com > 良精ASP微博管理系统 V1.0 > 良精ASP微博管理系统 V1.0\code\login.asp
<!--#include file="Include/LiangjingConn.asp"--> <!--#include file="Include/function.asp"--> <!--#include file="Include/Cls_Class2.asp"--> <!--#include file="Include/Md5.asp"--> <% webParmter="登录页面" if request.Form("action") = "check" then user_email = request.Form("user_email") user_pass = request.Form("user_pass") Set Rs = Server.CreateObject("adodb.recordset") Sql = "Select * from Liangjing_User Where trim(User_Email)='"&trim(user_email)&"' and trim(User_Pass)='"&trim(Md5(user_pass))&"'" Rs.open Sql,conn,1,2 if Rs.eof then Response.Redirect("Login.asp?Msg=您输入的账号不存在,或账号与密码不对应!") response.End() else if Rs("User_IsLock") = true then Response.Redirect("Login.asp?Msg=您的账号当前为锁定状态,不能登入哦!") Response.End() else Session("_WUserID") = trim(Rs("User_ID")) Session("_WIsSupper") = Rs("User_IsSupper") Session("_UserCoolName") = Rs("User_CoolName") '小子修改:定义已登录用户名 Rs("User_LastLoginDate") = Now() Rs("User_LastLoginIP") = Request.ServerVariables("REMOTE_ADDR") Rs("user_loginNum") = Rs("user_loginNum") + 1 response.cookies("_tempuser_email") ="" Rs.update Rs.close Session.Timeout = 1200 if err.number = 0 then page = Request.Form("page") if page <> "" then on error resume next page1 = split(page,"||") page2 = split(page1(1),"$") page3 = page1(0)&"?"&page2(0)&"="&page2(1) 'Response.Write(page3) 'Response.end if Err.Number = 0 then Response.Redirect(page3) else Response.Redirect("my.asp?User_ID="&Session("_WUserID")) end if else Response.Redirect("index.asp") end if else Call WoDig.Msgbox2("出错了!"&err.description,0,"0") end if end if end if Set Rs = nothing end if %> <!--#include file="Include/header.asp"--> </div> <%Response.Write("<div id=""headRound"" class=""clear""><span class=""left""></span><span class=""right""></span></div>")%> <div id="mainWrapper" class="clear" style="min-height:260px;background:#C9F1FF;);"> <div class="wording"> </div> <div class="loginBox"> <script language="javascript"> function frm_onsubmit(frm){ frm = eval(frm); if(frm.user_email.value==""){ alert("请输入<%=Web_Name%>账号!"); frm.user_email.focus(); return false; } if(frm.user_pass.value==""){ alert("请输入<%=Web_Name%>账户的密码!"); frm.user_pass.focus(); return false; } } </script> <table width="<%=Web_TPageWidth%>" border="0" align="center" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="460px;" align="left"> <% Dim Logins Set Logins = New Cls_Login Call Logins.Get_Login Set Logins = Nothing %> </td> <td width="1" bgcolor="#E1E1E1"></td> <td> <table border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="left"> <div style="padding-top:10px;"> <script type="text/javascript"><!-- google_ad_client = "pub-3406709034811813"; /* 200x200, 创建于 10-6-28 */ google_ad_slot = "1578354907"; google_ad_width = 200; google_ad_height = 200; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <div> </td></tr></table> </td> </tr> </table> <table width="760" height="1" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td background="images/dot.jpg"></td> </tr> </table> <br /> </div> </div> <%Response.Write("<div id=""footRound"" class=""clear""><span class=""left""></span><span class=""right""></span></div>"&vbcr)%> <!--#include file="Include/footer.asp"-->